package bgate.hung.workerclass;

import java.io.IOException;

import bgate.hung.activity.R;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class StaticBitmap {
	private static Resources res;
	private static Context context;
	private static Bitmap registerMenuItem, losePassMenuItem, enMenuItem,
			viMenuItem, introductionMenuItem, callSupportMenuItem, statusRoom0,
			statusRoom1, statusRoom2, statusRoom3, statusRoom4, statusRoom5,
			table0, table1, table2, table3, table4, card, signCard,
			playBackGround, an_button, boc_button, continue_button,
			danh_button, ha_button, nap_ycoin_button, ready_button,
			girl_black_avatar, girl_avatar, boy_black_avatar, boy_avatar,
			ready_play, chat_button, not_ready_button, logo_phom, logo_bacay,
			logo_tienlen, boss, time_bar_zero_horizontal,
			time_bar_full_horizontal, time_bar_zero_vertical,
			time_bar_full_vertical;

	public static void setResources(Resources r, Context c) {
		res = r;
		context = c;
	}

	public static Bitmap getRegisterMenuItemImage() {
		if (registerMenuItem == null)
			registerMenuItem = BitmapFactory.decodeResource(res,
					R.drawable.register_menu_item);
		return registerMenuItem;
	}

	public static Bitmap getLosePassMenuItemImage() {
		if (losePassMenuItem == null)
			losePassMenuItem = BitmapFactory.decodeResource(res,
					R.drawable.lose_pass_menu_item);
		return losePassMenuItem;
	}

	public static Bitmap getEnMenuItemImage() {
		if (enMenuItem == null)
			enMenuItem = BitmapFactory.decodeResource(res,
					R.drawable.en_menu_item);
		return enMenuItem;
	}

	public static Bitmap getViMenuItemImage() {
		if (viMenuItem == null)
			viMenuItem = BitmapFactory.decodeResource(res,
					R.drawable.vi_menu_item);
		return viMenuItem;
	}

	public static Bitmap getIntroductionMenuItemImage() {
		if (introductionMenuItem == null)
			introductionMenuItem = BitmapFactory.decodeResource(res,
					R.drawable.introduction_menu_item);
		return introductionMenuItem;
	}

	public static Bitmap getCallSupportMenuItemImage() {
		if (callSupportMenuItem == null)
			callSupportMenuItem = BitmapFactory.decodeResource(res,
					R.drawable.call_support_menu_item);
		return callSupportMenuItem;
	}

	public static Bitmap getStatusRoom0Image() {
		if (statusRoom0 == null)
			statusRoom0 = BitmapFactory.decodeResource(res,
					R.drawable.room_status_0);
		return statusRoom0;
	}

	public static Bitmap getStatusRoom1Image() {
		if (statusRoom1 == null)
			statusRoom1 = BitmapFactory.decodeResource(res,
					R.drawable.room_status_1);
		return statusRoom1;
	}

	public static Bitmap getStatusRoom2Image() {
		if (statusRoom2 == null)
			statusRoom2 = BitmapFactory.decodeResource(res,
					R.drawable.room_status_2);
		return statusRoom2;
	}

	public static Bitmap getStatusRoom3Image() {
		if (statusRoom3 == null)
			statusRoom3 = BitmapFactory.decodeResource(res,
					R.drawable.room_status_3);
		return statusRoom3;
	}

	public static Bitmap getStatusRoom4Image() {
		if (statusRoom4 == null)
			statusRoom4 = BitmapFactory.decodeResource(res,
					R.drawable.room_status_4);
		return statusRoom4;
	}

	public static Bitmap getStatusRoom5Image() {
		if (statusRoom5 == null)
			statusRoom5 = BitmapFactory.decodeResource(res,
					R.drawable.room_status_5);
		return statusRoom5;
	}

	public static Bitmap getTable0Image() {
		if (table0 == null)
			table0 = BitmapFactory.decodeResource(res, R.drawable.table0);
		return table0;
	}

	public static Bitmap getTable1Image() {
		if (table1 == null)
			table1 = BitmapFactory.decodeResource(res, R.drawable.table1);
		return table1;
	}

	public static Bitmap getTable2Image() {
		if (table2 == null)
			table2 = BitmapFactory.decodeResource(res, R.drawable.table2);
		return table2;
	}

	public static Bitmap getTable3Image() {
		if (table3 == null)
			table3 = BitmapFactory.decodeResource(res, R.drawable.table3);
		return table3;
	}

	public static Bitmap getTable4Image() {
		if (table4 == null)
			table4 = BitmapFactory.decodeResource(res, R.drawable.table4);
		return table4;
	}

	public static Bitmap getCardImage() {
		if (card == null)
			card = BitmapFactory.decodeResource(res, R.drawable.card);
		return card;
	}

	public static Bitmap getSignCardImage() {
		if (signCard == null)
			signCard = BitmapFactory.decodeResource(res, R.drawable.sign_phom);
		return signCard;
	}

	public static Bitmap getPlayBackGroundImage() {
		if (playBackGround == null)
			try {
				playBackGround = BitmapFactory.decodeStream(context.getAssets()
						.open("play_background.png"));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		return playBackGround;
	}

	public static Bitmap getAnButtonImage() {
		if (an_button == null)
			an_button = BitmapFactory.decodeResource(res, R.drawable.an_button);
		return an_button;
	}

	public static Bitmap getBocButtonImage() {
		if (boc_button == null)
			boc_button = BitmapFactory.decodeResource(res,
					R.drawable.boc_button);
		return boc_button;
	}

	public static Bitmap getContinueButtonImage() {
		if (continue_button == null)
			continue_button = BitmapFactory.decodeResource(res,
					R.drawable.continue_button);
		return continue_button;
	}

	public static Bitmap getDanhButtonImage() {
		if (danh_button == null)
			danh_button = BitmapFactory.decodeResource(res,
					R.drawable.danh_button);
		return danh_button;
	}

	public static Bitmap getHaButtonImage() {
		if (ha_button == null)
			ha_button = BitmapFactory.decodeResource(res, R.drawable.ha_button);
		return ha_button;
	}

	public static Bitmap getNapYcoinButtonImage() {
		if (nap_ycoin_button == null)
			nap_ycoin_button = BitmapFactory.decodeResource(res,
					R.drawable.nap_ycoin_button);
		return nap_ycoin_button;
	}

	public static Bitmap getReadyButtonImage() {
		if (ready_button == null)
			ready_button = BitmapFactory.decodeResource(res,
					R.drawable.ready_button);
		return ready_button;
	}

	public static Bitmap getGirlBlackAvatarImage() {
		if (girl_black_avatar == null)
			girl_black_avatar = BitmapFactory.decodeResource(res,
					R.drawable.girl_black_avatar);
		return girl_black_avatar;
	}

	public static Bitmap getGirlAvatarImage() {
		if (girl_avatar == null)
			girl_avatar = BitmapFactory.decodeResource(res,
					R.drawable.girl_avatar);
		return girl_avatar;
	}

	public static Bitmap getBoyBlackAvatarImage() {
		if (boy_black_avatar == null)
			boy_black_avatar = BitmapFactory.decodeResource(res,
					R.drawable.boy_black_avatar);
		return boy_black_avatar;
	}

	public static Bitmap getBoyAvatarImage() {
		if (boy_avatar == null)
			boy_avatar = BitmapFactory.decodeResource(res,
					R.drawable.boy_avatar);
		return boy_avatar;
	}

	public static Bitmap getReadyPlayImage() {
		if (ready_play == null)
			ready_play = BitmapFactory.decodeResource(res,
					R.drawable.ready_play);
		return ready_play;
	}

	public static Bitmap getChatButtonImage() {
		if (chat_button == null)
			chat_button = BitmapFactory.decodeResource(res,
					R.drawable.chat_button);
		return chat_button;
	}

	public static Bitmap getNotReadyButtonImage() {
		if (not_ready_button == null)
			not_ready_button = BitmapFactory.decodeResource(res,
					R.drawable.not_ready_button);
		return not_ready_button;
	}

	public static Bitmap getLogoPhomImage() {
		if (logo_phom == null)
			logo_phom = BitmapFactory.decodeResource(res, R.drawable.logo_phom);
		return logo_phom;
	}

	public static Bitmap getLogoBacayImage() {
		if (logo_bacay == null)
			logo_bacay = BitmapFactory.decodeResource(res,
					R.drawable.logo_bacay);
		return logo_bacay;
	}

	public static Bitmap getLogoTienlenImage() {
		if (logo_tienlen == null)
			logo_tienlen = BitmapFactory.decodeResource(res,
					R.drawable.logo_tienlen);
		return logo_tienlen;
	}

	public static Bitmap getBossImage() {
		if (boss == null)
			boss = BitmapFactory.decodeResource(res, R.drawable.boss);
		return boss;
	}

	public static Bitmap getTimeBarZeroHorizontal() {
		if (time_bar_zero_horizontal == null)
			time_bar_zero_horizontal = BitmapFactory.decodeResource(res,
					R.drawable.time_bar_zero_horizontal);
		return time_bar_zero_horizontal;
	}

	public static Bitmap getTimeBarFullHorizontal() {
		if (time_bar_full_horizontal == null)
			time_bar_full_horizontal = BitmapFactory.decodeResource(res,
					R.drawable.time_bar_full_horizontal);
		return time_bar_full_horizontal;
	}

	public static Bitmap getTimeBarZeroVertical() {
		if (time_bar_zero_vertical == null)
			time_bar_zero_vertical = BitmapFactory.decodeResource(res,
					R.drawable.time_bar_zero_vertical);
		return time_bar_zero_vertical;
	}

	public static Bitmap getTimeBarFullVertical() {
		if (time_bar_full_vertical == null)
			time_bar_full_vertical = BitmapFactory.decodeResource(res,
					R.drawable.time_bar_full_vertical);
		return time_bar_full_vertical;
	}
}
